<?php
if(PERMISSION != "F")
{
	redirectPage("index.php?module=logout");
	exit();
}

$sql = "SELECT * FROM games";
		
$result = $db_mysql->get_array($sql);
$No = 0;
foreach($result as $row)
{
	echo $row["game_id"]."<br/>";
	$user_word_correct = calculate_word_correct($row["user_word_grid"], $row["crossword_grid"]);
	
	$sql = "UPDATE games SET user_word_correct = '$user_word_correct' Where game_id = ".$row["game_id"];
	$db_mysql->query($sql);
}
